#include <iostream>
#include <string>

#include "searcher.hpp"

const std::string input = "../data/raw_html/raw.txt";

int main()
{
	ns_searcher::Searcher *search = new ns_searcher::Searcher();
	search->InitSearcher(input);

	std::string query;
	std::string json_str;
	while(true)
	{
		std::cout<<"please enter you search query :";
		getline(std::cin,query);	//处理cin是以' '为结束符
		search->Search(query,&json_str);
		std::cout << json_str <<std::endl;
	}
	return 0;
}